package com.fzu.ess.ess.controller;

import com.fzu.ess.common.Model.JsonModel;
import com.fzu.ess.ess.entity.Report;
import com.fzu.ess.ess.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by ercha on 2015/10/25.
 */

@Controller
@RequestMapping(value = "/report")
public class ReportController {
    @Autowired
    private ReportService reportService;

    @ResponseBody
    @RequestMapping(value = "/create", method = RequestMethod.POST)
    public JsonModel create(Report report, String bookId) {
        return reportService.create(report, bookId);
    }
}
